package com.matrix.async.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import org.springframework.format.annotation.DateTimeFormat;

import com.matrix.core.anotations.Extend;
/**
 *
 * @date 2017-09-03 16:15
 */
public class AsyncTaskBean implements Serializable{
	private static final long serialVersionUID = 1L; 

	
	private String  id;
			
	
	/**
	 * 异步包主键
	 */
	private String  pkgId;
			
	
	private Date  createTime;
			
	
	private String  createBy;
			
	
	/**
	 * 任务类型
	 */
	private String  taskType;
			
	
	/**
	 * 批次号
	 */
	private String  batchNo;
			
	
	/**
	 * 状态，0：待处理，1：处理中，2：执行成功，3：执行失败，4：执行时异常
	 */
	private String  status;
			
	
	private String  errorLog;
			
	
	/**
	 * 重试次数
	 */
	private Integer  retryTimes;
			
	
	/**
	 * 处理任务的主机名称
	 */
	private String  processedBy;
			
	
	/**
	 * 任务初始化时间
	 */
	private Date  initTime;
			
	
	/**
	 * 入队时间
	 */
	private Date  enqueueTime;
			
	
	/**
	 * 出队时间
	 */
	private Date  dequeueTime;
			
	
	/**
	 * 任务开始时间
	 */
	private Date  startTime;
			
	
	/**
	 * 处理完成时间
	 */
	private Date  finishTime;
			
	
	/**
	 * 排序时间
	 */
	private Integer  orderNo;
			
	@Extend
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	private Date beginTime = null;

	@Extend
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
	private Date endTime = null;

	Map<String, String> taskData;
	
	@Extend
	private String table;

	
	
	public String getTable() {
		return table;
	}

	public void setTable(String table) {
		this.table = table;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Map<String, String> getTaskData() {
		return taskData;
	}

	public void setTaskData(Map<String, String> taskData) {
		this.taskData = taskData;
	}

	public String getId() {
		return id;
	}
   	
   	public void setId(String id) {
		this.id=id;
	}
   	

	public String getPkgId() {
		return pkgId;
	}
   	
   	public void setPkgId(String pkgId) {
		this.pkgId=pkgId;
	}
   	

	public Date getCreateTime() {
		return createTime;
	}
   	
   	public void setCreateTime(Date createTime) {
		this.createTime=createTime;
	}
   	

	public String getCreateBy() {
		return createBy;
	}
   	
   	public void setCreateBy(String createBy) {
		this.createBy=createBy;
	}
   	

	public String getTaskType() {
		return taskType;
	}
   	
   	public void setTaskType(String taskType) {
		this.taskType=taskType;
	}
   	

	public String getBatchNo() {
		return batchNo;
	}
   	
   	public void setBatchNo(String batchNo) {
		this.batchNo=batchNo;
	}
   	

	public String getStatus() {
		return status;
	}
   	
   	public void setStatus(String status) {
		this.status=status;
	}
   	

	public String getErrorLog() {
		return errorLog;
	}
   	
   	public void setErrorLog(String errorLog) {
		this.errorLog=errorLog;
	}
   	

	 
   	

	public Integer getRetryTimes() {
		return retryTimes;
	}

	public void setRetryTimes(Integer retryTimes) {
		this.retryTimes = retryTimes;
	}

	public String getProcessedBy() {
		return processedBy;
	}
   	
   	public void setProcessedBy(String processedBy) {
		this.processedBy=processedBy;
	}
   	

	public Date getInitTime() {
		return initTime;
	}
   	
   	public void setInitTime(Date initTime) {
		this.initTime=initTime;
	}
   	

	public Date getEnqueueTime() {
		return enqueueTime;
	}
   	
   	public void setEnqueueTime(Date enqueueTime) {
		this.enqueueTime=enqueueTime;
	}
   	

	public Date getDequeueTime() {
		return dequeueTime;
	}
   	
   	public void setDequeueTime(Date dequeueTime) {
		this.dequeueTime=dequeueTime;
	}
   	

	public Date getStartTime() {
		return startTime;
	}
   	
   	public void setStartTime(Date startTime) {
		this.startTime=startTime;
	}
   	

	public Date getFinishTime() {
		return finishTime;
	}
   	
   	public void setFinishTime(Date finishTime) {
		this.finishTime=finishTime;
	}
   	

	public Integer getOrderNo() {
		return orderNo;
	}
   	
   	public void setOrderNo(Integer orderNo) {
		this.orderNo=orderNo;
	}
   	

	@Override
	public String toString() {
		return "{AsyncTask:{"
		+"id:"+id+","
		+"pkgId:"+pkgId+","
		+"createTime:"+createTime+","
		+"createBy:"+createBy+","
		+"taskType:"+taskType+","
		+"batchNo:"+batchNo+","
		+"status:"+status+","
		+"errorLog:"+errorLog+","
		+"retryTimes:"+retryTimes+","
		+"processedBy:"+processedBy+","
		+"initTime:"+initTime+","
		+"enqueueTime:"+enqueueTime+","
		+"dequeueTime:"+dequeueTime+","
		+"startTime:"+startTime+","
		+"finishTime:"+finishTime+","
		+"orderNo:"+orderNo+","
		+"}}";
	}


  
}